﻿using System;
using System.IO;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using SharedGenomics.Workbench.Core;

namespace SharedGenomics.Workbench.Tests.Core
{
    [TestClass]
    public class AssignmentMappingStrategyTests
    {
        [TestMethod]
        public void ShouldAddMapping()
        {
            var ms = new AssignmentMappingStrategy<Stream>();
            Dictionary<Type, Type> mappings = new Dictionary<Type, Type>();
            ms.ExamineType(typeof(MemoryStream), mappings);

            Assert.AreEqual(1, mappings.Count);
        }

        [TestMethod]
        public void ShouldNotAddMapping()
        {
            var ms = new AssignmentMappingStrategy<string>();
            Dictionary<Type, Type> mappings = new Dictionary<Type, Type>();
            ms.ExamineType(typeof(int), mappings);

            Assert.AreEqual(0, mappings.Count);
        }
    }
}
